package cn.broadsense.thrid.result;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 以图搜图返回结果
 *
 * @author pengxin
 * @date 2022-10-12 14:26
 */
@NoArgsConstructor
@Data
@ApiModel("以图搜图返回结果")
public class VideoExTractListResult implements Serializable {
    private static final long serialVersionUID = -6259033627880366046L;


    private String taskId;
    @ApiModelProperty("进度")
    private Integer progress;
    @ApiModelProperty("总数")
    private Integer totalCount;
    @ApiModelProperty("类型 1-人；2-机动车；3-非机动车")
    private Integer objectType;
    @ApiModelProperty("人数据结果")
    private List<PersonsResult> persons;
    @ApiModelProperty("相识度")
    private BigDecimal threshold;
    @ApiModelProperty("非机动车数据结果")
    private List<NonMotoVehicleResult> nonMotoVehicles;
    @ApiModelProperty("机动车数据结果")
    private List<DataResult> results;

    @ApiModelProperty("机动车数据结果")
    private List<VehiclesResult> vehicles;

    /**
     * -人像返回数据
     */
    @NoArgsConstructor
    @Data
    public static class PersonsResult {
        private BigDecimal threshold;
        private DataResult person;
    }

    /**
     * -机动车 返回数据
     */
    @NoArgsConstructor
    @Data
    public static class VehiclesResult {
        private BigDecimal threshold;
        private DataResult vehicle;

    }

    @NoArgsConstructor
    @Data
    public static class NonMotoVehicleResult {
        private BigDecimal threshold;
        private DataResult nonMotoVehicle;
    }

    @NoArgsConstructor
    @Data
    public static class RectResult {
        private Long leftTopX;
        private Long leftTopY;
        private Long rightBtmX;
        private Long rightBtmY;
    }


    @NoArgsConstructor
    @Data
    public static class DataResult {
        private Long capTime;
        private String targetImgUri;
        private String imgUri;
        private RectResult rect;
        private String channelId;
        private String recordId;
        private String sourceId;
        private Integer dataSource;
        private String userChannelCode;
        private String channelCode;
        private String capTimeStr;
        private Boolean faceFlag;
        private String faceImgUri;
        private String faceRecordId;
        private String channelName;
        private String gpsX;
        private String gpsY;
        private BigDecimal threshold;
    }
}
